<!DOCTYPE HTML>

<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<title>${title}</title>
		<link rel="stylesheet" type="text/css" href="${rootUrl}resource/ext/resources/ext-all.css">
		<link rel="stylesheet" type="text/css" href="${rootUrl}resource/cs/ext/resources/cs-ext-all.css">
	</head>

	<body>
		<div id="cs-div-loading">
			正在加载中......【<span id="cs-div-loading-msg">加载样式和图片</span>】
		</div>
		<script>
			window.rootUrl = '$!{rootUrl}';
			window.moduleUrl = '$!{moduleUrl}';
		</script>

		<script>document.getElementById('cs-div-loading-msg').innerHTML = '加载核心';</script>
		<script type="text/javascript" src="${rootUrl}resource/ext/ext-all.js"></script>
		<script>document.getElementById('cs-div-loading-msg').innerHTML = '加载组件';</script>

		<script type="text/javascript" src="${rootUrl}resource/ext/ext-lang-zh_CN.js"></script>
		<script type="text/javascript" src="${rootUrl}resource/cs/ext/src/cs-ext-all.js"></script>
		<script>
			document.getElementById('cs-div-loading-msg').innerHTML = 'UI初始化';

			Ext.onReady(function() {
				Ext.QuickTips.init();

				var page = Ext.create('CS.page.Main', '${page}');

				page.bind(${event});

				page.render();

				var json = '$!{data}';
				if (json != '') {
					page.setData(Ext.decode(json));
				}

				Ext.get('cs-div-loading').remove();
			});
		</script>
	</body>
</html>